package com.sixth.controller;

import com.sixth.core.entity.OrderChargeItem;
import com.sixth.core.vo.R;
import com.sixth.service.OrderChargeItemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @program: sixth-hospital-parent
 * @description:
 * @author: 李劲锋
 * @create: 2024-08-17 17:47
 **/
@RestController
@RequestMapping("/charge/orderItem")
@Api(tags = "缴费明细")
public class OrderChargeItemController {
    @Autowired
    private OrderChargeItemService orderChargeItemService;

    @GetMapping("/List/{orderId}")
    @ApiOperation(value = "缴费明细")
    public R<List<OrderChargeItem>> orderList(@PathVariable String orderId){
        return orderChargeItemService.orderItemList(orderId);
    }

    @PostMapping("/payOrderById/{orderId}")
    @ApiOperation(value = "缴费")
    public R payOrderById(@PathVariable String orderId){
        return orderChargeItemService.payOrderById(orderId);
    }

}
